package com.linkage.order.repository;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Repository;

import com.linkage.book.pojo.Book;
import com.linkage.order.pojo.Order;
import com.linkage.order.pojo.OrderLine;
/**
 * 
 * @author XiaMingYu
 *
 */
@Repository
public interface OrderRepository {
	public List<Order> queryAll();
	public Order generateOrder(HttpServletRequest request);
	public OrderLine generateOrderLine(HttpServletRequest request, Book book);
	public void saveOrder(Order order);
	public void saveOrderLine(OrderLine orderLine);
	public void deleteOrder(String orderId);
	public Order findOrderById(String orderId);
	public void payOrder(String orderId);
	public double calTotal(int userId ,int bookIdquantity );
	public void confirm(Order order);
	public Order loadOneOrder(String orderId);
	public OrderLine loadOneOrderLine(String orderId);
}
